﻿namespace BepuUtilities
{
    public class BitOperations
    {
        public static int PopCount(uint value)
        {
            return System.Numerics.BitOperations.PopCount(value);
        }

        public static uint RoundUpToPowerOf2(uint value)
        {
            return System.Numerics.BitOperations.RoundUpToPowerOf2(value);
        }

        public static ulong RoundUpToPowerOf2(ulong value)
        {
            return System.Numerics.BitOperations.RoundUpToPowerOf2(value);
        }

        public static int LeadingZeroCount(uint value)
        {
            return System.Numerics.BitOperations.LeadingZeroCount(value);
        }

        public static int Log2(uint value)
        {
            return System.Numerics.BitOperations.Log2(value);
        }
    }
}
